package org.ehais.shop.model;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.persistence.Transient;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
 
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table(name = "t_sys_user")
public class SysUser implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;             //id
    private String account;          //账号
    private String password;         //密码
    private String realName;         //真实姓名
    private Integer roleId;           //角色id
    @Column(name = "mobile")
    private String phone;            //电话
    private String address;          //地址
    private Integer sex;            //性别
    @DateTimeFormat(pattern = "yyyy-mm-dd")
    private Date birthday;           //出生日期
    private Integer createdUserId;     //创建人id
    private Date createdTime;     //创建时间
    private Integer updatedUserId;     //修改人id
    private Date updatedTime;         //修改时间
    private String idPicPath;        //证件照路径
    private String workPicPath;       //工作证照片路径
    @Transient
    private Integer age;            //用户年龄
    @Transient
    private String roleIdName;        //角色名称
    private Integer nickName;
}